package com.yckj.day05;

/**
 * TODO
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/22 10:25
 */
public class BubbleSortDemoTest {
    public static void main(String[] args) {
//        int[] arr = {23,2,15,78,34,56,40};
//        System.out.println("排序前："+Arrays.toString(arr));
        int[] arr = new int[80000];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random()*100+1);
        }
        long start = System.currentTimeMillis();
        BubbleSortDemo.bubbleSort(arr);
        long end = System.currentTimeMillis();
//        System.out.println("排序后："+Arrays.toString(arr));
        System.out.println("排序花费"+(end-start)+"毫秒");
    }
}
